<?php
/**
 * Created by PhpStorm.
 * User: D
 * Date: 2019/5/10
 * Time: 20:06
 */
function dbHelper($sql){
    $dbHost='127.0.0.1';
    $dbName='root';
    $dbPwd="";
    $dbdataBase='yemaijiu';//是大名字
    $dbPort='3306';
    //创建连接
    $conn=new mysqli("$dbHost",$dbName,$dbPwd,$dbdataBase,$dbPort);

    //设置连接字符集
    mysqli_query($conn,"set names utf8");

    //执行查询
    $result=$conn->query($sql);
    $conn->close();
    return $result;
}
